package hxs.events.flash.net;
import flash.net.NetStream;
import flash.events.AsyncErrorEvent;
import flash.events.IOErrorEvent;
import flash.events.NetStatusEvent;
import flash.events.SecurityErrorEvent;
import hxs.events.flash.events.EventDispatcherEvents;
import hxs.extras.FlashSignal;
import hxs.extras.FlashEventsStore;

/**
 * ...
 * @author Tony Polinelli
 */

class NetStreamEvents extends EventDispatcherEvents
{

	public function new(target:NetStream) 
	{
		super(target);
	}
	
	public static function getEvents(target:NetStream):NetStreamEvents
	{
		return cast FlashEventsStore.getEvents(target);
	}
	
	/* */
	
	public var asyncError(getAsyncError, never):FlashSignal<AsyncErrorEvent>;
	private function getAsyncError():FlashSignal<AsyncErrorEvent>
	{
		return cast getNativeSignal(AsyncErrorEvent.ASYNC_ERROR);
	}
	
	public var ioError(getIoError, never):FlashSignal<IOErrorEvent>;
	private function getIoError():FlashSignal<IOErrorEvent>
	{
		return cast getNativeSignal(IOErrorEvent.IO_ERROR);
	}
	
	public var netStatus(getNetStatus, never):FlashSignal<NetStatusEvent>;
	private function getNetStatus():FlashSignal<NetStatusEvent>
	{
		return cast getNativeSignal(NetStatusEvent.NET_STATUS);
	}
	
}